package com.test.singleton.ehan;

//饿汉,静态代码块
public class Singleton2 {

    private Singleton2(){}
    private final static Singleton2 instance;

    static {
        instance = new Singleton2();
    }
    public static Singleton2 getInstance(){
        return instance;
    }
}
